-
Notifications
You must be signed in to change notification settings - Fork 36
[Disk Manager] Add context handling in collectListerMetricsTask #4633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Disk Manager] Add context handling in collectListerMetricsTask #4633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Run method in collectListerMetricsTask to improve context cancellation handling by using a select statement instead of a simple for range loop over the ticker channel.
Key changes:
- Added explicit context cancellation handling via
selectstatement withctx.Done()case - Restructured the ticker loop to allow graceful shutdown when context is cancelled
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.